﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Toolkit.Web.Infastructure;
using System.Web;

namespace Toolkit.Web.ViewComponents.Panel
{
    public sealed class Panel : ViewComponentBase
    {
        public Panel(IViewComponentWriter writer)
            : base(writer)
        {
            BodyHtmlAttributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
            ClientEventHandlers = new ClientEventHandlers();
            HtmlBuilder = new PanelHtmlBuilder(this);
        }

        public HtmlTemplate PrimaryHeader
        {
            get;
            set;
        }

        public HtmlTemplate SecondaryHeader
        {
            get;
            set;
        }

        public HtmlTemplate Body
        {
            get;
            set;
        }

        public bool Collapsible
        {
            get;
            set;
        }

        public bool CollapseOnRender
        {
            get;
            set;
        }

        public IDictionary<string, object> BodyHtmlAttributes
        {
            get;
            private set;
        }

        public ClientEventHandlers ClientEventHandlers
        {
            get;
            set;
        }
    }
}
